package com.wanpinghui.wphlibrary.model.product;

import com.wanpinghui.wphlibrary.model.order.bean.OrderItemBean;
import com.wanpinghui.wphlibrary.model.order.bean.SingleOrderItem;
import com.wanpinghui.wphlibrary.model.product.bean.AddCartParamsBean;
import com.wanpinghui.wphlibrary.model.product.bean.CartBean;
import com.wanpinghui.wphlibrary.model.product.bean.EditCartItemCountParams;
import com.wanpinghui.wphlibrary.model.product.bean.OrderCreateParams;
import com.wanpinghui.wphlibrary.model.product.bean.ProductBean;
import com.wanpinghui.wphlibrary.model.product.bean.ProductGroupBean;
import com.wanpinghui.wphlibrary.model.product.bean.ProductPageBean;

import java.util.List;

import retrofit.callback.YRequestCallback;

/***
 * 功能描述:
 * 作者:qiujialiu
 * 时间:2017/12/20
 ***/

public interface ProductService {
    /**
     * 获取购物车商品数量
     * @param isFirst
     * @param callback
     */
    void getCartCount(boolean isFirst,YRequestCallback<Integer> callback);

    /**
     * 获取产品类列表
     * @param callback
     */
    void getProductTypes(YRequestCallback<List<ProductGroupBean>> callback);

    /**
     * 获取首页产品列表
     * @param groupId
     * @param currentPage
     * @param callback
     */
    void getProductList(int groupId, int supplierId, int userId, int currentPage, YRequestCallback<ProductPageBean> callback);

    /**
     * 添加产品到购物车
     * @param paramsList
     * @param callback
     */
    void addToCart(List<AddCartParamsBean> paramsList, YRequestCallback callback);

    /**
     * 代他人添加本人产品至其购物车
     * @param paramsList
     * @param callback
     */
    void addBuyerCart(List<AddCartParamsBean> paramsList, YRequestCallback callback);

    void updateCart(List<AddCartParamsBean> paramsList, YRequestCallback callback);

    void getCartList(YRequestCallback<List<CartBean>> callback);

    /**
     * 修改购物车商品数量
     * @param params
     * @param callback
     */
    void changeCartItemCount(EditCartItemCountParams params, YRequestCallback callback);

    void createOrder(OrderCreateParams params, YRequestCallback<SingleOrderItem> callback);
}
